package org.ling.xuan.dialog;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import org.jetbrains.annotations.Nullable;
import org.ling.xuan.entity.mo.LocalAdd;
import org.ling.xuan.pannel.LocalAddPanel;

import javax.swing.*;

public class AddInfoDialog extends DialogWrapper {
    private final LocalAddPanel panel;

    public AddInfoDialog(@Nullable Project project, boolean canBeParent, LocalAdd localAdd) {
        super(project, canBeParent);
        setTitle("Add Info");
        panel = new LocalAddPanel(localAdd);
        init();
    }

    public LocalAdd getSetting() {
        return panel.getObjectValues();
    }

    @Override
    protected @Nullable JComponent createCenterPanel() {
        return panel;
    }
}
